#include "stm32f10x.h"                  // Device header
#include "Delay.h"
#include "OLED.h"
#include "Serial.h"

uint8_t RxData;

int main(void)
{
	OLED_Init();
	Serial_Init();
	
	OLED_ShowString(1,1,"TxData:");
	OLED_ShowString(2,1,"RxData:");
	Serial_SendByte(0x40);
	uint8_t Arrary[] = {0x41, 0x42, 0x43, 0x44};
	Serial_SendArray(Arrary, 4);
	Serial_SendString("abc");
	Serial_SendNum(456, 3);
//	printf("\r\nNum2=%d", 222);
	Serial_Printf("\r\nNum4=%d", 444);
	
	
	
	while(1)
	{
		if(Serial_GetRxFlag() == 1)
		{
			RxData = Serial_GetRxData();
			Serial_SendByte(RxData);	
			OLED_ShowHexNum(2, 8, RxData, 2);
		}
	}
}
